===================================================================================================

Replication files for the paper

"Forecasting Conditional Probabilities of Binary Outcomes under Misspecification"

by Graham Elliott (UC San Diego), Dalia Ghanem (UC Davis) and Fabian Kr�ger (Heidelberg Institute
for Theoretical Studies)

contact: Fabian Kr�ger, fabian.krueger@h-its.org

===================================================================================================

The files posted here contain R code to replicate the figures and numerical results in the paper. A
quick summary of the files is as follows:


- procedures.R contains functions that are loaded by the other programs

- Figure1.R creates Figure 1 in the paper (weighting functions implied by various scoring rules)

- Figure2to5_Table3.R produces numerical results for the asymptotic problem. The code simulates a 
  large sample (one million draws) from one of the DGPs summarized in Table 2 of the paper. Then, the 
  logit model is estimated under all six scoring rules, producing the parameter estimates reported 
  in Table 3. Based on these estimates, one panel of each of Figures 2 to 5 is produced. 
  NOTE: Re-running the code four times (setting "dgp.nr" to any of 1, 2, 3, 4) produces all panels
  of each figure.

- AppFigure1to3.R produces Figures 1 to 3 of the online appendix (these are color versions of Figures 2, 
  3 and 5 in the paper).

- MCstudy_rollingwindows.R runs the numerical study discussed in Section 3.2 of the paper. The results
  are then saved as ".RData" objects. NOTE: This part is fairly computer intensive - for each of the 
  four DGPs, the program runs for about 200 minutes on a fast PC (Intel i7, 16GB RAM), producing output
  files of about 500 MB. Researchers interested in obtaining these output files directly please contact 
  Fabian Kr�ger (see below) to arrange a file transfer. 

- Table3and4.R produces tex code for Tables 3 and 4 in the paper. As to Table 4, the program loads
  the ".Rdata" objects produced by MCstudy_rollingwindows.R

- AppFigure4and5.R produces Figures 4 and 5 of the online appendix (small-sample analogues of Figures
  2 and 3 in the paper), again based on the ".Rdata" objects produced by MCstudy_rollingwindows.R


NOTE: Two external R packages are used by some of the programs: "ggplot2" (authored by Hadley Wickham 
and Winston Chang) and "sandwich" (authored by Thomas Lumley Achim Zeileis). Both packages are freely 
available via the CRAN repository, http://cran.r-project.org/.


For questions/comments, please contact Fabian Kr�ger (fabian.krueger@h-its.org).


 
